package com.dq.Week1.day05;

public class CatDemo {
    public static void main(String[] args) {
        Cat cat = new Cat();
        Cat cat1 = new Cat("yellow",17,"Tom","female",100,20);
        Cat cat2 = new Cat("white",12,"Hanavi","male",100,17);
        Cat cat3 = new Cat("white",27,"Havei","male",100,17);

       int[] age = {cat1.age, cat2.age,cat3.age};
        //行为：吃
        cat1.eat(cat2);
        System.out.println(cat1.name+"吃的很多，涨到了"+ cat1.weight+"斤，开心值为："+cat1.happy);
        System.out.println("好朋友"+cat2.name+"和"+cat1.name+"一起吃的，似乎更开心吃的也更多，体重涨到了"+cat2.weight+"斤，开心值也到达"+cat2.happy);
        //行为：睡觉
        cat1.sleep();
        cat2.sleep();
        //行为：抓鱼
        cat1.catchFish(cat1.color);
        cat2.catchFish(cat2.color);
        //行为：后空翻
        cat1.BackwardSomersault();
        cat2.BackwardSomersault();
        //行为：年龄做冒泡排序
        cat.bubbleSort(age);//排的是年龄

    }
}
